package com.studentsys.dao;


import com.studentsys.bean.Admin;
import com.studentsys.utils.BaseDao;

public class AdminDao extends BaseDao<Admin> {
    public Admin login(String username,String password){
        String sql = "select * from admin where username = ? and password = ?";
        return queryOne(sql,Admin.class,username,password);
    }

    public int regist(String username,String password){
        String sql = "insert into admin(username,password)values(?,?)";
        return adu(sql,username,password);
    }

    public Admin checkUser(String username) {
        String sql = "select * from admin where username=?";
        return queryOne(sql,Admin.class,username);
    }
}
